<%@page import="br.com.maternity.classes.dao.ExameDAO"%>
<%@page import="br.com.maternity.classes.entity.Exame"%>
<jsp:include page="../cabecalho.jsp"></jsp:include>
<%
    String id = "0", descricao = "", servletUrl = request.getContextPath() + "/cadastroExame";
    if (request.getParameter("id") != null) {
        id = request.getParameter("id").toString();
        Exame e = new ExameDAO().getById(Integer.parseInt(id));
        descricao = e.getDescricao();
    }
%>
<div id="titulo">Cadastro de Exame</div>
<div id="erro"></div>
<form id="frmExame" name="frmExame" method="POST" action="cadastroExame">
    <input type="hidden" name="hdfId" id="hdfId" value="<%=id%>">
    <table>
        <tr>
            <td>Descricao: <br /> <input type="text" name="txtDescricao" id="txtCPF" maxlength="200" value="<%=descricao%>"></td>
        </tr>
    </table>
    <br />
    
    <a class="botao" href="#" onClick="enviaForm('frmExame', '<%=servletUrl%>', 'erro');">Salvar</a>&nbsp;&nbsp;
    <a class="botao" href="<%=request.getContextPath() + "/relatorios/listagemExames.jsp"%>">Voltar </a>

</form>
<jsp:include page="../rodape.jsp"></jsp:include>